package com.foreknow.OOP;

import java.util.Scanner;

public class StudentTest {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Student[] sts = new Student[3];
        for (int i = 0; i < 3;i++){
            Student st = new Student();
            System.out.println("请输入姓名");
            String name = scan.next();
            System.out.println("请输入学号");
            String sno = scan.next();
            System.out.println("请输入成绩");
            int score = scan.nextInt();
            st.setName(name);
            st.setSno(sno);
            st.setScore(score);
            sts[i] = st;
        }
        Student st = new Student();
        Student[] stArray = st.sortStudent(sts);
        for (int i = 0;i < stArray.length;i++){
            System.out.println("姓名"+ stArray[i].getName() + "学号" + stArray[i].getSno() + "成绩" + stArray[i].getScore());
        }
    }


}
